package xyz.schwi.cels.service;

import xyz.schwi.cels.entity.*;

import java.io.IOException;

/**
 * @author schwi
 * @date 2021/9/29 0029  11:12
 */
public interface BaseService {
    /**
     * 查询所有单词
     *
     * @param firstLitter 首字母
     * @param count       每页
     * @param page        页码
     * @return 返回单词集合
     * @throws IOException 文件读取错误
     */
    PageBean<Word> selectWords(String path, Character firstLitter, int count, int page) throws IOException;

    /**
     * 查询所有词汇
     *
     * @param count 每页
     * @param page  页码
     * @return 返回词汇集合
     * @throws IOException 文件读取错误
     */
    PageBean<Vocabulary> selectVocabularies(String path, int count, int page) throws IOException;

    PageBean<Base> selectAll(String path, int count, int page) throws IOException;

    NewTest newGame() throws IOException;

    NewTest newTest(String wPath, String vPath, int count) throws IOException;

    NewTest continueGame(String path, String jsonPath) throws IOException;

    NewTest continueError(String path, String jsonPath) throws IOException;

    NewTest readErrTest(String path, String jsonPath, boolean error) throws IOException;
}
